import 'package:flutter_axrjc/datasource/network/api/KnowledgeApi.dart';
import 'package:flutter_axrjc/datasource/network/bean/HelpCenterBean.dart';
import 'package:get/get.dart';

import 'state.dart';

class HelpCenterDetailLogic extends GetxController {
  final HelpCenterDetailState state = HelpCenterDetailState();
  late HelpCenterBean bean;
  @override
  void onInit() {
    super.onInit();
    bean = Get.arguments as HelpCenterBean;
    getDetail();
  }

  Future<void> getDetail() async {
    state.helpDetail.value =
        await KnowledgeApi.getSingleHelp("${bean.contentId}");
  }
}
